function Figure = fun_createFigure(F, A, B, B1, freq, I_row, I_col, ...
            noise_intensity, noise_mean_num, gamma,...
    phase_shift, phase_shift_tilts, filepath)

        
    
    % 生成均匀相移的矩阵
    Figure = cell(F,1);
    Delta = cell(F,1);
    for f = 1 : F
        Delta{f,1} = phase_shift(f)*ones(I_row,I_col);
    end

    % 生成非均匀相移的矩阵
    Alpha = cell(F,1);
    Delta_mac = Delta;
    Q = 2;
    flag = 1;
    for f = 1 : F
        Alpha{f,1} = [0, f, f, f, f, f] * phase_shift_tilts;
        Alpha{f,1} = Alpha{f,1} * flag;
        [~,Delta_mac{f,1}] = Maclaurin(I_row,I_col,Q,Alpha{f,1});
        flag = -1*flag;
    end
    
%     [~, Delta_lrd] = create_lrd(I_row,I_col,Q,phase_shift_tilts);

    % 均匀相移+非均匀相移 = 最终加在物体上的相移
    mu = zeros(1,F);
    sigma = zeros(1,F)*1;
    for f = 1 : F
        Delta{f,1} = Delta{f,1} + Delta_mac{f,1};
        Delta{f,1} = mu(f) + sigma(f)*randn(size(Delta{f,1})) + Delta{f,1};
%         Delta{f,1} = imnoise(Delta{f,1},'gaussian', 0, phase_shift_noise);
        Delta{1,1}(:) = 0;
%         max_delta = max(Delta{f,1}(:));
%         Delta{f,1} = Delta{f,1} - max_delta;
        addDelta = Delta{f,1};
        save([filepath,'I-',int2str(f),'-addDelta.mat'],'addDelta');
        mean_phase_shift = sum(addDelta(:))/(I_row*I_col);
        save([filepath,'I-',int2str(f),'-mean_phase_shift.mat'],'mean_phase_shift');
    end

    
    % 生成物体
    d = 20;
    l = d*20;
    % ball
%     pk = createObject(I_row, I_col);
    % peaks
    pk = zeros(I_row,I_col);
    pk(1:min(I_row,I_col),1:min(I_row,I_col)) = abs(peaks(min(I_row,I_col)))*10;
    % 三角处理
    pk = 2*pi*d*pk./((l-pk)*I_col/freq);
%     disp(max(pk(:)));
    % none
%     pk(:) = 0;


    unwarpphase = zeros(I_row,I_col);
    for c = 1:I_col
        unwarpphase(:,c) = c*2*pi*freq/I_col.*ones(I_row,1) + pk(:,c);
    end
    Phi = mod(unwarpphase,2*pi);
    Phi(Phi > pi) = Phi(Phi>pi) - 2*pi;
    save([filepath,'Phi.mat'],'Phi');
    save([filepath,'unwarpphase.mat'],'unwarpphase');
    save([filepath,'pk.mat'],'pk');
    sum_delta = zeros(size(Delta{1,1}));
    for f = 1:F
        delta = Delta{f,1}; 
        for c = 1:I_col
              Phi = c*2*pi*freq/I_col.*ones(I_row,1) + pk(:,c);
              phi_delta = Phi + delta(:,c) + mod((f-1),F)*pi*2/F;
              Figure{f,1}(:,c) = A + B.*cos(phi_delta)+B1.*cos(2.*phi_delta);
        end
        sum_delta = sum_delta + delta;
    end
    num = 1;
%     flag = 1;
    for f = 1 : F
        str = [filepath,'I-',int2str(f),'.bmp'];
        Figure{f,1} = Figure{f,1}.^(1/gamma);
%        Figure{f,1}(1:I_row/2,1:I_col/2) = Figure{f,1}(1:I_row/2,1:I_col/2) + rand(I_row/2, I_col/2)./10;
%        Figure{f,1} = imnoise(Figure{f,1},'gaussian',noise_mean_num*flag,noise_intensity);
%         figure;imshow(mat2gray(Figure{f,1}));
        Figure{f,1} = noise_mean_num + noise_intensity(f)*randn(size(Figure{f,1})) + Figure{f,1};
        imwrite(Figure{f,1},str);fprintf('------%s条纹图生成！------ \n', str);
        num = num + 1;
%        flag = flag * -1;
    end

end

function output = createObject(I_row, I_col)
    r = max(I_row,I_col)/4;
    disp(r);
    temp = zeros(I_row,I_col);
    Y0 = I_row/2;
    X0 = I_col/2;
    for i = 1:I_row
        for j = 1:I_col
            if ((X0-j)^2 + (Y0-i)^2 <= r^2)
                temp(i,j) = sqrt(r^2-(X0-j)^2-(Y0-i)^2);
            end
        end
    end
    output = temp;
end